/**
 * 字符串替换
 * @param {String} val 
 * @param {String} pattern 替换模式
 * @param {String} ARepText 替换为字符串
 * @returns 
 */
export function replaceAll(val, pattern, ARepText) {
    const raRegExp = new RegExp(pattern, "g");
    return val.replace(raRegExp, ARepText);
}